package com.groupseven.happycampus.service;



import com.groupseven.happycampus.common.pojo.Commodity;
import com.groupseven.happycampus.common.result.R;
import com.groupseven.happycampus.common.vo.LayuiPageVo;

import java.util.List;
import java.util.Map;

public interface CommodityService {
    LayuiPageVo<Commodity> commodityListPageData(Map<String, Object> params);

    int addCommodity(Commodity commodity);

    int deleteCommodity(Integer commodityId);

    int updateCommodity(Commodity commodity);


    /**
     * 交易类中的购买操作方法
     * @param commodity 购买的商品
     * @return 返回购买结果
     */
    R purchasedCommodity(Commodity commodity);

    R purchasedCommodityByIds(String ids);
}
